package com.bwie.mapper;

import com.bwie.common.domain.Order;
import com.bwie.common.domain.ResourceInfo;
import com.bwie.common.domain.request.OrderListReq;
import com.bwie.common.domain.request.ResourceInfoListReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @className: ResourceMapper
 * @Description: TODO
 * @version: v1.８.0
 * @author: 汪菲阳
 * @date: 2025/11/10 11:11
 */
@Mapper
public interface ResourceMapper {
    List<ResourceInfo> infoList(ResourceInfoListReq resourceInfoListReq);

    List<Order> orderList(OrderListReq orderListReq);

    /**
     * 精确匹配查重
     */
    List<ResourceInfo> findExactDuplicates(@Param("title") String title,@Param("pissn") String pissn, @Param("eissn") String eissn, @Param("pisbn") String pisbn, @Param("eisbn") String eisbn);

    /**
     * 模糊匹配查重
     */
    List<ResourceInfo> findByTitleLike(@Param("title") String title);

    List<ResourceInfo> findByPissn(@Param("pissn") String pissn);

    List<ResourceInfo> findByEissn(@Param("eissn") String eissn);

    List<ResourceInfo> findByPisbn(@Param("pisbn") String pisbn);

    List<ResourceInfo> findByEisbn(@Param("eisbn") String eisbn);

    /**
     * 批量插入
     */
    void batchInsert(@Param("list") List<ResourceInfo> list);

}